<!DOCTYPE html>

<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font-awesome.css" />
    <link rel="stylesheet" href="./css/xadmin.css" />
    <link rel="stylesheet" href="./lib/layui/css/layui.mobile.css" />
    <link rel="stylesheet" href="'./css/cate.css'" />

    <script src="./lib/layui/layui.all.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>


    <!-- 面板 -->
    <div class="layui-fluid">
      <div class="layui-row layui-col-space15">
        <div class="layui-card">
          <div class="layui-card-body">
            <!-- 搜索按钮 -->
            <!-- <form class="layui-form form" id="searchBtn">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label labelSize">分类名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="catename" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item layui-inline">
                            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">
                  <i class="layui-icon layui-icon-search"></i>
                  搜索
                </button>
                            <button type="reset" class="layui-btn layui-btn-primary" id="resetBtn">
                  <i class="layui-icon layui-icon-refresh-1"></i>
                  重置
                </button>
                        </div>
                    </form> -->
            <form class="layui-form" action="" id="sou">
              <div class="layui-form-item">
                <label class="lb">分类名称</label>
                <div class="layui-inline">
                  <input type="text" name="tagname" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input" id="sha" />
                </div>
                <div class="layui-inline">
                  <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">
                    <i class="layui-icon layui-icon-search"></i>
                    搜索
                  </button>
                  <button type="reset" id="resetBtn" class="layui-btn layui-btn-primary">重置</button>
                </div>
              </div>
            </form>
            <!-- 按钮 -->
            <div class="box">
              <div class="lt">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo" id="addBtn">
                  <i class="layui-icon layui-icon-add-1"></i>
                  新增
                </button>
                <button type="reset" class="layui-btn layui-btn-warm" id="export">
                  <i class="layui-icon layui-icon-release"></i>
                  导出
                </button>
              </div>
              <!-- <div class="rt">
                <span id="vanishTop"><i class="layui-icon layui-icon-up"></i></span>
                <span id="vanishDown" style="display: none"><i class="layui-icon layui-icon-down"></i></span>
                <a href="javascript:;" class="one">
                  <i class="layui-icon layui-icon-refresh-3"></i>
                </a>
                <a href="javascript:;" class="one">
                  <i class="layui-icon layui-icon-app"></i>
                </a>
              </div> -->
              <!-- <div class="right">
                            <a href="javascript:;" class="one rigth_one">
                                <i class="layui-icon layui-icon-up"></i>
                            </a>
                            <a href="javascript:;" class="one">
                                <i class="layui-icon layui-icon-refresh-3"></i>
                            </a>
                            <a href="javascript:;" class="one">
                                <i class="layui-icon layui-icon-app"></i>
                            </a>
                        </div> -->
            </div>

            <table class="layui-table">
              <colgroup>
                <col width="150" />
                <col width="200" />
                <col />
              </colgroup>
              <thead>
                <tr>
                  <th>#</th>
                  <th>分类ID</th>
                  <th>分类名称</th>
                  <th>图标class</th>
                  <th>权重</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody></tbody>
            </table>
            <!-- <div class="adv-box">
                        <div>
                            <input class="check" type="checkbox" /> 分类ID
                        </div>
                        <div>
                            <input class="check" type="checkbox" /> 分类名称
                        </div>
                        <div>
                            <input class="check" type="checkbox" /> 图标class
                        </div>
                        <div>
                            <input class="check" type="checkbox" /> 权重
                        </div>
                    </div> -->

            <div id="test1"></div>
          </div>
        </div>
      </div>
    </div>

    <script type="text/html" id="cateTpl">
      {{each data}}
      <tr>
        <td>{{$index+1}}</td>
        <th>{{$value.id}}</th>
        <td>{{$value.catename}}</td>
        <th>{{$value.icon}}</th>
        <th>{{$value.sort_num}}</th>
        <td>
          <button type="button" class="layui-btn layui-btn-normal" data-id="{{$value.id}}" id="writeBtn">编辑</button>
          <button type="button" class="layui-btn layui-btn-danger" data-id="{{$value.id}}" id="delBtn">删除</button>
        </td>
      </tr>
      {{/each}}
    </script>
    <!-- 新增 -->
    <script type="text/html" id="addTpl">
      <form class="layui-form" id="addForm" lay-filter="addForm">
        <div class="layui-form-item">
          <label class="layui-form-label">分类名称</label>
          <div class="layui-input-block">
            <input type="text" name="catename" required lay-verify="required" placeholder="请输入分类名" autocomplete="off" class="layui-input ipt1" />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">图标class</label>
          <div class="layui-input-block">
            <input type="text" name="icon" required lay-verify="required" placeholder="请输入class名" autocomplete="off" class="layui-input ipt" />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">排序大小</label>
          <div class="layui-input-block">
            <input type="text" name="sort_num" required lay-verify="required" placeholder="1-15" autocomplete="off" class="layui-input ipt" />
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">确定</button>
            <button type="reset" class="layui-btn layui-btn-primary" id="cancelBtn">取消</button>
          </div>
        </div>
      </form>
    </script>
    <!-- 修改 -->
    <script type="text/html" id="addTplDate">
      <form class="layui-form" id="addFormDate" lay-filter="addFormDate">
        <input type="text" name="default_data" id="" hidden />
        <input type="text" name="id" id="" hidden />
        <div class="layui-form-item">
          <label class="layui-form-label">分类名称</label>
          <div class="layui-input-block">
            <input type="text" name="catename" required lay-verify="required" placeholder="请输入分类名" autocomplete="off" class="layui-input ipt1" />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">图标class</label>
          <div class="layui-input-block">
            <input type="text" name="icon" required lay-verify="required" placeholder="请输入class名" autocomplete="off" class="layui-input ipt" />
          </div>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">排序大小</label>
          <div class="layui-input-block">
            <input type="text" name="sort_num" required lay-verify="required" placeholder="1-15" autocomplete="off" class="layui-input ipt" />
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">确定</button>
            <button type="reset" class="layui-btn layui-btn-primary" id="cancelBtn">取消</button>
          </div>
        </div>
      </form>
    </script>
    <script src="./js/template-web.js"></script>

    <script src="./lib/layui/layui.all.js"></script>
    <script src="./js/jquery.min.js"></script>
    <script src="./js/baseApi.js"></script>
    <script src="./js/axios.js"></script>
    <script src="./js/jquery.table2excel.min.js"></script>
    <script src="./js/cate.js"></script>
  </body>
</html>
